﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache"/>   
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate"/>   
<meta http-equiv="expires" content="0"/>  
<title>无标题文档</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="js/jquery.js"></script>

<script type="text/javascript">
$(function(){	
	//导航切换
	$(".menuson li").click(function(){
		$(".menuson li.active").removeClass("active")
		$(this).addClass("active");
	});
	
	$('.title').click(function(){
		var $ul = $(this).next('ul');
		$('dd').find('ul').slideUp();
		if($ul.is(':visible')){
			$(this).next('ul').slideUp();
		}else{
			$(this).next('ul').slideDown();
		}
	});
})	
function refreshMenu(menus){
	//alert(JSON.stringify(menus));
	$(".lefttop").empty();
	$('<span></span><b>'+menus.functionName+'</b>').appendTo($(".lefttop"));
	$(".leftmenu").empty();
	$.each(menus.children,function(i,child){
		var dd = $('<dd></dd>');		
		var menusons = $('<ul class="menuson"></ul>');
		$.each(child.children,function(i,grandson){
			var menuItem = $('<li id="'+grandson.functionId+'" ><cite></cite><a href="'+grandson.action+'" target="rightFrame"><p>'+grandson.functionName+'</p></a><i></i></li>');
			$(menuItem).appendTo($(menusons));
		});
		var titleDiv = $('<div class="title" id="'+child.functionId+'"><span><img src="images/leftico01.png" /></span>'+child.functionName+'</div>');
		$(titleDiv).appendTo($(dd));
		$(menusons).appendTo($(dd));
		$(dd).appendTo($(".leftmenu"));
	});
	$(".menuson li").click(function(){
		$(".menuson li.active").removeClass("active")
		$(this).addClass("active");
	});	
	$('.title').click(function(){
		var $ul = $(this).next('ul');
		$('dd').find('ul').slideUp();
		if($ul.is(':visible')){
			$(this).next('ul').slideUp();
		}else{
			$(this).next('ul').slideDown();
		}
	});
}
function swithMenul(parentFunctionId,functionId){
	try{
		$('.title[id="'+parentFunctionId+'"]').trigger('click');
		$('#'+functionId).trigger('click');
		$('#'+functionId).find('A').find('p').trigger('click');
	}catch(e){
		console.log(e.message);
	}
}

function swithFirstMenul(parentFunctionId,functionId){
	try{
		$('#'+functionId).trigger('click');
		$('#'+functionId).find('A').find('p').trigger('click');
	}catch(e){
		console.log(e.message);
	}
}

function swithSignCustomer(parentFunctionId,functionId){
	try{
		//$('.title[id="'+parentFunctionId+'"]').trigger('click');
		$('#'+functionId).trigger('click');
		$('#'+functionId).find('A').find('p').trigger('click');
	}catch(e){
		console.log(e.message);
	}
}

</script>


</head>

<body style="background:#f0f9fd;">
	<div class="lefttop"><!-- <span></span>通讯录  --></div>
    
    <dl class="leftmenu">
        

    </dl>
</body>
</html>
